class Cat:
    def __init__(self,name,tili):
        self.name=name
        self.tili=tili
    def play(self):
        i=self.tili-5;
        print("我叫%s,在玩耍，体力减少：%d"%(self.name,i))
    def sleep(self):
        i = self.tili +10;
        print("我叫%s,在睡觉，体力回复：%d" % (self.name, i))

cat1=Cat('美美',50)
cat1.play()
cat1.sleep()